{% extends 'base.html' %}

{% block title %} Login {% endblock %}

{% block content %}
    <h1>Login</h1>

    {% if form.errors %}
        <p>
            Your username and password didn't match.
            Please try again.
        </p>
    {% else %}
         <p>Please,user the following form to login</p>
    {% endif %}
    <div class="login-form">
        <form action="{% url 'login' %}" method="post">
            {% csrf_token %}
            {{ form.as_p }}
            <input type="hidden" name="next" value="{{ next }}">
            <p><input type="submit" value="login"></p>
        </form>
        <p><a href="{% url 'password_reset' %}">Forgotten your password?</a></p>
    </div>
    <div class="social">
        <ul>
            <li class="google"><a href="{% url 'social:begin' 'google-oauth2'%}">Login wigh Google</a></li>
        </ul>
    </div>
{% endblock %}